package drp.snowbell.cfg;

public class PropertyConfig {
	private String name;// 属性名称
	private String label;
	private boolean isUnique;// 数据是否唯一
	private String valueType;
	private boolean isRequired;
	private boolean isReadOnly;
	private boolean isPersistent; // 是否是数据库字段
	private String relation;

	private String dbFieldName;// 数据库字段名称
	private int dbLength;
	private String dbType;
	private String dbDefaultValue;

	/** 全文搜索配置参数.如果是JSON格式,匹配{@link FullTextConfig},如果值为字符串"true"表示enable=true */
	private String fullTextConfig;

	private String setterName;// setter函数名. 为空的话根据name推断
	private String getterName;// getter函数名. 为空的话根据name推断

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getLabel() {
		return label;
	}

	public void setIsUnique(boolean isUnique) {
		this.isUnique = isUnique;
	}

	public boolean getIsUnique() {
		return isUnique;
	}

	public void setValueType(String valueType) {
		this.valueType = valueType;
	}

	public String getValueType() {
		return valueType;
	}

	public void setIsRequired(boolean isRequired) {
		this.isRequired = isRequired;
	}

	public boolean getIsRequired() {
		return isRequired;
	}

	public void setDbFieldName(String dbFieldName) {
		this.dbFieldName = dbFieldName;
	}

	public String getDbFieldName() {
		return dbFieldName;
	}

	public void setDbType(String dbType) {
		this.dbType = dbType;
	}

	public String getDbType() {
		return dbType;
	}

	public void setDbDefaultValue(String dbDefaultValue) {
		this.dbDefaultValue = dbDefaultValue;
	}

	public String getDbDefaultValue() {
		return dbDefaultValue;
	}

	public void setDbLength(int dbLength) {
		this.dbLength = dbLength;
	}

	public int getDbLength() {
		return dbLength;
	}

	public void setSetterName(String setterName) {
		this.setterName = setterName;
	}

	/**
	 * setter函数名.
	 * 
	 * @return
	 */
	public String getSetterName() {
		return setterName;
	}

	public void setGetterName(String getterName) {
		this.getterName = getterName;
	}

	public String getGetterName() {
		return getterName;
	}

	public void setIsReadOnly(boolean isReadOnly) {
		this.isReadOnly = isReadOnly;
	}

	public boolean getIsReadOnly() {
		return isReadOnly;
	}

	public void setFullTextConfig(String fullTextConfig) {
		this.fullTextConfig = fullTextConfig;
	}

	public String getFullTextConfig() {
		return fullTextConfig;
	}

	public boolean getIsPersistent() {
		return isPersistent;
	}

	public void setIsPersistent(boolean isPersistent) {
		this.isPersistent = isPersistent;
	}

	public String getRelation() {
		return relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}

}
